package com.springboot.search.dao;

import com.springboot.search.entity.ESGoods;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

public interface ESGoodsDao extends ElasticsearchRepository<ESGoods,Integer> {
    /**
     * 根据商品名称以及商品描述搜索商品
     * @param goodsDescribe
     * @param goodsName
     * @return
     */
    List<ESGoods> findByGoodsDescribeOrGoodsName(String goodsDescribe,String goodsName);

    /**
     * 根据商品名称索商品
     * @param goodsName
     * @return
     */
    List<ESGoods> findByGoodsName(String goodsName);
}
